{% extends "base.html" %}

{% block headtitle %}Assets{% endblock %}



{% block header_scripts %}
<script type="text/javascript" src="/m/js/lib/jquery.js"></script>
<script type="text/javascript" src="/m/js/lib/jquery.jstree.js"></script>
<script type="text/javascript">
SHOW_DIVISIONS = "{{ divisions_str }}";
SHOW_IN_SPACE = {% if show_in_space %}true{% else %}false{% endif %};
SHOW_IN_STATIONS = {% if show_in_stations %}true{% else %}false{% endif %};
</script>

{% endblock %}


{% block breadcrumbs %}
<li><a href="/">Home</a></li>
<li><a href="/assets" >Assets</a></li>
{% endblock %}

{% block main_content %}
<h1 class="pagetitle">Corporation Assets <span class="time">- last update {{ scan_date|ecm_datetime }}</span></h1>

<form id="search_form" class="search_form">
    <input type="text" id="search_text" value="" />
    <input type="submit" class="button" id="search_button" value="Search" />
    <input type="button" class="button" id="clear_search" value="Reset Search" />
    <input type="button" class="button" id="expand_all"   value="Expand All" />
    <input type="button" class="button" id="close_all"   value="Collapse All" />
</form>

<form id="filter_form" class="filter_form" >
    {% for h in hangars %}
    <div title="Press ctrl + click to select only one" >
        <input type="checkbox" id="{{ h.hangarID }}" value="{{ h.hangarID }}" class="hangar-checkbox"
        {% if h.checked %}checked="true"{% endif %} />
        <span class="checkbox-name">{{ h.name }}</span>
    </div>
    {% endfor %}
    <br>
    <div title="Press ctrl + click to select only one" >
        <input type="checkbox" id="show_stations" value="show_stations" class="space-checkbox"
        {% if show_in_stations %}checked="true"{% endif %} />
        <span class="checkbox-name">In Station</span>
    </div>
    <div title="Press ctrl + click to select only one" >
        <input type="checkbox" id="show_space" value="show_space" class="space-checkbox"
        {% if show_in_space %}checked="true"{% endif %} />
        <span class="checkbox-name">In Space</span>
    </div>
    <div><input type="button" class="button" id="apply_filter" value="Apply Filter" /></div>
    <div><input type="button" class="button" id="reset_filter" value="Reset Filter" /></div>
</form>

<div id="assets_tree"></div>

<script type="text/javascript" src="/m/js/assets_tree.js"></script>

{% endblock %}
